using System;
using System.Collections.Generic;
using System.Text;
using Objects;

namespace DAL
{
    public class DALDanhSachThongTinKhachHang
    {
        public List<DanhSachThongTinKhachHang> GetAllItem(int idKhachHang, DateTime NgayDangKy)
        {
            List<DanhSachThongTinKhachHang> ListDanhSachKhachHang = new List<DanhSachThongTinKhachHang>();

            clsDataAccess acc = new clsDataAccess();

            string[] sname = new string[] {"@idkhachhang","@ngaydangky" };
            string[] vname = new string[] { idKhachHang.ToString(),NgayDangKy.ToString()};
            System.Data.DataSet ds = acc.CommandSelect("DanhSachThongTinKhachHang_GetAllItem", sname, vname);

            DanhSachThongTinKhachHang Item = new DanhSachThongTinKhachHang();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                System.Data.DataRow dr = ds.Tables[0].Rows[i];
                ListDanhSachKhachHang.Add((Item.Populate(dr)));
            }
            return ListDanhSachKhachHang;
        }
    }
}
